const mongoose = require("mongoose")
const Schema = mongoose.Schema

const recoredSchema = new Schema({
  // 活动名称
  title: {
    type: String,
    required: true,
  },
  // 活动数据
  num: {
    type: Number,
    required: true,
  },
  // 活动描述
  des: {
    type: String,
    required: true,
  },
  // 活动创建时间
  time: {
    type: Date,
    default: Date.now,
  },
  // 上一次修改时间
  updateTime: {
    type: Date,
    default: Date.now,
  },
  // 是否展示给用户
  isShow: {
    type: Boolean,
    default: false,
  },
})

module.exports = mongoose.model("record", recoredSchema)
